home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1353 < prev    next >
Encoding:
Text File  |  1996-08-06  |  1.3 KB  |  37 lines

  1. Newsgroups: comp.lang.c++
  2. Path: news.sprintlink.net!news1!MAUI
  3. From: jeffl@inter-intelli.com (Jeff Lindholm)
  4. Subject: Re: Simple program-but not for me!!HELP.
  5. X-Nntp-Posting-Host: inter6.inter-intelli.com
  6. Message-ID: <DKz0ur.4u@iquest.net>
  7. Sender: news@iquest.net (News Admin)
  8. Organization: Interactive Intelligence, Inc.
  9. X-Newsreader: News Xpress Version 1.0 Beta #3
  10. References: <4cu9jm$s8h@mercury.hgmp.mrc.ac.uk>
  11. Date: Wed, 10 Jan 1996 18:10:09 GMT
  12.  
  13. In article <4cu9jm$s8h@mercury.hgmp.mrc.ac.uk>,
  14.    Mark Bradburn <m-bradbu@nimr.mrc.ac.uk> wrote:
  15. >I have an output file from a program that comes in the form:-
  16. >
  17. >'Sequence = name1, Structure = name2, SCORE = xxx.xx
  18. >    "             name2      "             othername1,       "
  19. >   "              othername1   "        othername2,       "
  20. >etc.'
  21. >
  22. >What i need to do is extract the scores values from each line,sort them
  23. >according to (name
  24. > with name,name with othername,othername with othername) then write the
  25. >sum,mean and sd for each to seperate files.How is the easiest way to do
  26. >this,bearing in mind i am just about competent with while (if) and other loop
  27. >commands and am virtually lost with 'for' statements.
  28. >
  29. >    Thanks in advance for any help..
  30. >
  31. >    -Mark
  32.  
  33. Try using strtok to break the line apart. That should start you in the general 
  34. direction. Is this perchance a class project?
  35.  
  36. Jeff
  37.